﻿@model CandidateManager.Areas.Coach.Models.SubjectModifyModel

@{
    ViewBag.Title = @Resources.Coach.CoachManageSubjects;
}

@section script{
    <script type="text/javascript">
        $.ajaxSetup({
            cache: false
        });
    </script>
}

@{Html.RenderPartial("SubjectManagement", Model.Subject);}

<h2>@Resources.Coach.CoachSubjectList</h2>

<table class="bordered">
    <thead>
        <tr>
            <th>@Resources.Coach.CoachEdit</th>
            <th>@Resources.Coach.CoachSubjectName</th>
            <th>@Resources.Coach.CoachDescription</th>
            <th>@Resources.Coach.CoachState</th>
            <th>@Resources.Coach.CoachDelete</th>
        </tr>
    </thead>
    @foreach (var subject in Model.Subjects)
    {
        <tr>
            <td class="Center column-detail">@Ajax.ActionLink(@Resources.Coach.CoachEdit, "Manage", "Subjects", new { subjectId = subject.Id }, new AjaxOptions { HttpMethod = "Get", UpdateTargetId = "SubjectSave"}, new { @class = "common-btn BlueColor" })</td>
            <td>@subject.Name</td>
            <td>@subject.Description</td>
            <td>@subject.State</td>
            <td class="Center column-detail">@Html.ActionLink(@Resources.Coach.CoachDelete, "Delete", "Subjects", new { subjectId = subject.Id }, new { @class = "common-btn RedColor" })</td>
        </tr>
    }
</table>
